package Controller;

import java.io.FileNotFoundException;

import Modele.*; 
import Vue.*; 

public class GestionRepertoire {
	
	static FichierContact file; 
	static Contact contact; 
	static Repertoire repertoire; 
	static Fenetre fenetre; 
	static boolean b;
    static String[] c; 
	
	public static void main(String[] args) throws FileNotFoundException {
	 
		file = new FichierContact(); 
		file.read();
		
		contact = new Contact(); 
		repertoire = new Repertoire();
	    
	      do{
			contact = new Contact(file.read());
			repertoire.addContact(contact);
		  }while(file.hasNext());
	      
	      repertoire.triAlpha();
	      fenetre= new Fenetre(repertoire.toStringBasic("Amis")); 
	      
	   

	}


	public static Contact getContact() {
		return contact;
	}


	public static void setContact(Contact contact) {
		GestionRepertoire.contact = contact;
	}


	public static Repertoire getRepertoire() {
		return repertoire;
	}


	public static void setRepertoire(Repertoire repertoire) {
		GestionRepertoire.repertoire = repertoire;
	}


	public static Fenetre getFenetre() {
		return fenetre;
	}


	public static void setFenetre(Fenetre fenetre) {
		GestionRepertoire.fenetre = fenetre;
	}


	public static String[] getC() {
		return c;
	}


	public static void setC(String[] c) {
		GestionRepertoire.c = c;
	}


	
}
